package com.woniuxy.controller;

import com.woniuxy.entity.NursingRec;
import com.woniuxy.entity.dto.NursePatientDTO;
import com.woniuxy.service.NursePatientService;
import com.woniuxy.service.NursingRecService;
import com.woniuxy.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/nursingrec")
public class NursingRecController {
    @Autowired
    NursingRecService nursingRecService;

    @PostMapping("/addnur")
    public ResponseData addNur(@RequestBody NursingRec nursingRec){
        return nursingRecService.addRec(nursingRec) ;

    }
    @GetMapping("/querynr/{patId}")
    public ResponseData queryNr(@PathVariable Integer patId){
        return nursingRecService.queryBypatId(patId);
    }
}
